<?php
         global $Room;
         $id=$data2['room'];
         $Room[$id]['xx']['zt']=3;

         if($Room[$id]['type']==2 || ($Room[$id]['type']==1 && $Room[$id]['bank'])){
            $time_interval = 1;
            $Room[$id]['time3']=time()+$time_interval;
            djs($time_interval,'setbank',$id);
            return false;
         }

         if($Room[$id]['time2']==0){
            cleardjs($Room[$id]['djs'],$id);
            return false;
         }
         cleardjs($Room[$id]['djs'],$id);

         $Room[$id]['time2']=0;

         $time_interval = 10;
         //抢庄
         $Room[$id]['time3']=time()+$time_interval;
         djs($time_interval,'setbank',$id);

        if($Room[$id]['type']==1){
          foreach ($Room[$id]['user'] as $connection3) {
            if($connection3->user['online']!='-1'){
                act('djs',$Room[$id]['time3'],$connection3);
                $msg=array();
                $msg['id']='divRobBankerText';
                $msg['html']='<p class="liurenniuniu-ziti">上庄</p>';
                act('html',$msg,$connection3);

                if($connection3->user['zt']=='1'){
                  $Room[$id]['user'][$connection3->user['id']]->user['qbank']='-1';
                  $msg=array();
                  $msg['id']='operationButton';
                  $msg['html']='<div class="operationButton-3-zt" id="jiurenqz" style="display: block;" onclick="qbank(1)">
                                <img class="operationButton-3" src="/app/img/bull9/bull_button_orange.png">
                                <div class="operationButton-3-ts" >
                                 上庄
                                </div>
                               </div>
                               <div class="operationButton-4-zt" id="jiurenbqz" style="display: block;" onclick="qbank(0)">
                                <img class="operationButton-gg" src="/app/img/bull9/bull_button_blue.png"> 
                                <div class="operationButton-gg1" >
                                 不上
                                </div>
                               </div>';
                  act('html',$msg,$connection3);
                }
            }
          }
        }
        else{
        foreach ($Room[$id]['user'] as $connection3) {
          if($connection3->user['zt']=='1'){
            $Room[$id]['user'][$connection3->user['id']]->user['qbank']='-1';
          }
            if($connection3->user['online']!='-1'){
                act('djs',$Room[$id]['time3'],$connection3);
                $msg=array();
                $msg['id']='divRobBankerText';
                $msg['html']='<p class="liurenniuniu-ziti">抢庄</p>';
                act('html',$msg,$connection3);
                
                if($connection3->user['zt']=='1'){
                $msg=array();
                $msg['id']='operationButton';
                if($Room[$id]['type']==4){
                    $msg['html']='<div class="divCoin divCoin1" style="display: block;
                    z-index: 200;" onclick="qbank(1)">
                      <img src="/app/img/bull9/bull_times_bg1.png"  class="operationButton-gg"  /> 
                      <div class="operationButton-gg3">
                       1倍
                      </div>
                     </div> 
                     <div class="divCoin divCoin2" style="display: block;
                    z-index: 200;" onclick="qbank(2)">
                      <img src="/app/img/bull9/bull_times_bg1.png"  class="operationButton-gg"  /> 
                      <div  class="operationButton-gg3"  >
                       2倍
                      </div>
                     </div> 
                     <div class="divCoin divCoin3" style="display: block;
                    z-index: 200;" onclick="qbank(4)">
                      <img src="/app/img/bull9/bull_times_bg1.png"  class="operationButton-gg"  /> 
                      <div  class="operationButton-gg3"  >
                       4倍
                      </div>
                     </div> 
                     <div class="divCoin divCoin4" style="display: block;
                    z-index: 200;" onclick="qbank(0)">
                      <img src="/app/img/bull9/bull_times_bg_blue.png"  class="operationButton-gg"  /> 
                      <div  class="operationButton-gg3"  >
                       不抢
                      </div>
                     </div> 
                ';
                }
                else{
                $msg['html']='<div class="operationButton-3-zt" id="jiurenqz" style="display: block;" onclick="qbank(1)">
                              <img class="operationButton-3" src="/app/img/bull9/bull_button_orange.png">
                              <div class="operationButton-3-ts" >
                               抢庄
                              </div>
                             </div>
                             <div class="operationButton-4-zt" id="jiurenbqz" style="display: block;" onclick="qbank(0)">
                              <img class="operationButton-gg" src="/app/img/bull9/bull_button_blue.png"> 
                              <div class="operationButton-gg1" >
                               不抢
                              </div>
                             </div>';
                }
                act('html',$msg,$connection3);
            }
          }
        }
      }
